﻿@model IEnumerable<ITProject.WebUI.Models.Project.ProjectTeamViewModel>
@using ITProject.WebUI.Models.Project
@{
    ViewBag.Title = "Zespoły projektu " + @Html.Encode(ViewData["ProjectName"]);
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Zespoły projektu @Html.Encode(ViewData["ProjectName"])</h2>

<div class="Pmenu">
@Html.Partial(MVC.Shared.Views.Partials._ProjectMenuControl, 
        new ProjectMenuViewModel { ProjectName = (string)ViewData["ProjectName"], Role = (ITProject.Domain.UserRole)ViewData["Role"] })
</div>
<div class="PAplane">

<div>
        <span style="width:150px" class="callTH">
            Nazwa Zespołu
        </span>
        <span style="width:150px" class="callTH">
            Lider Zespołu
        </span>
        <span  style="width:150px" class="callTH">Data utworzenia</span>
        <span style="width:206px" class="callTH">Opis</span>
</div>
<div>
@{
    int i = 0;
}
@foreach (var item in Model) {
    i++;
        <span style="width:150px"  class="call">
            @Html.DisplayFor(modelItem => item.Name)
        </span>
        <span style="width:150px" class="call">
            @Html.DisplayFor(modelItem => item.Leader)
        </span>
        <span style="width:150px" class="call">
            @Html.DisplayFor(modelItem => item.DateOfCreate)
        </span>
        <span style="width:206px" class="call">
            @Html.DisplayFor(modelItem => item.Description)
        </span><br />
            <span id="@i.ToString()" style="width:650px" class="showUser" >uzytkownicy
        </span><br />
     
    string id = i.ToString() + "U";
 
    <div id="@id.ToString()" style="display:none" class="userss">
    @if (item.TeamUsers.Length == 0)
    {
        <span style="width:650px" class="listU">brak</span>
    }
    @foreach (string items in item.TeamUsers)
    {
        
        <span class="listU" style="width:650px">
        @Html.ActionLink(items, MVC.Account.ActionNames.Profil, MVC.Account.Name, new { Login = items }, null)
        </span><br />
    } 
    </div>
}

</div>
</div>
<div class="clear"></div>